<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<p:panel style="border: none;">
	<h:panelGrid columns="3" cellpadding="2" style="border: 2px;">
		<h:outputText value="Código" />
		<h:outputText value="Forma" />
		<h:outputText value="" />

		<p:inputText id="popcFormaIdFiltro" value="#{beanForma.filtro.id}"
			maxlength="4" size="7" />
		<p:inputText id="popcFormaDescricaoFiltro"
			value="#{beanForma.filtro.descricao}" size="78" />
		<p:commandButton id="popcFormaFind" value="Buscar"
			icon="ui-icon-search" action="#{beanForma.find}"
			update="popcFormaTabelaForma" />
	</h:panelGrid>

	<br></br>
	<p:separator />

	<p:dataTable value="#{beanForma.formaPagamentos}" var="forma"
		id="popcFormaTabelaForma">
		<p:column headerText="Codigo">
			<h:outputText value="#{forma.id}" />
		</p:column>

		<p:column headerText="Forma de Pagamento">
			<h:outputText value="#{forma.descricao}" />
		</p:column>

		<p:column headerText="Selecionar" width="10">
			<p:commandButton id="selectForma" oncomplete="dConsultaForma.hide()"
				icon="ui-icon-circle-check" title="selecionar"
				update=":form:condicaoPagamento">
				<f:setPropertyActionListener value="#{forma}"
					target="#{beanCondicao.condicao.formaPagamento}" />
			</p:commandButton>
		</p:column>

	</p:dataTable>

	<p:separator />
	<br></br>

	<h:panelGrid columns="4">
		<p:commandButton id="popcFormaNovo" value="Novo"
			title="Criar Forma de Pagamento" onclick="dManterForma.show() ">
		</p:commandButton>
		<p:commandButton id="popcFormaVoltar" value="Voltar"
			onclick="dConsultaForma.hide()" />
	</h:panelGrid>

</p:panel>

<p:dialog header="Manter Forma de Pagamento" widgetVar="dManterForma"
	id="popcFormaManterForma" resizable="false">
	<ui:include src="/formaPagamento/pManterFormaPagamento.xhtml"></ui:include>
</p:dialog>

</html>